﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace Thread
{
    class Program
    {
        static void Main(string[] args)
        {
            
            Action<String> action = Dosomethin;
            AsyncCallback asyncCallback = ar => { Console.WriteLine($"Dosomething"); };
            action.BeginInvoke("Dosomethin",null,null);
        
            Console.ReadKey();
        }

        public static void Dosomethin(string name)
        {
            Console.WriteLine("Dosomething start");
            for (int i = 0; i < 1000; i++)
            {
                i++;
            }
            Console.WriteLine("Dosomething End");
          
        }
      
    }
}
